<template>
<div style="margin:0 0 20px" >
    <Card style="width:0.9" dis-hover>
        <!-- <div style="text-align:left">
            <h3>请选择配置方案: </h3>
        </div> -->
    <Row style="margin:20px">
    <h3>请选择数据方案:</h3>
    <Button class="btn1"  @click="fillKey(None)":class="showmode0?'active':'btn2'">A组数据</Button>
    <Button class="btn1" @click="fillKey0(1)":class="showmode1?'active':'btn2'">B组数据</Button>
    </Row>
    <Row style="margin:20px">
    <h3>请选择策略:</h3>
    <Button class="btn1" @click="handleSubmit(None)":class="showmode2==2?'active':'btn2'">均值方差策略</Button>
    <Button class="btn1" @click="handleSubmit0(1)":class="showmode3==3?'active':'btn2'">平均策略</Button>
    <Button class="btn1" @click="handleSubmit1(2)":class="showmode4==4?'active':'btn2'">等差策略</Button>
    </Row>
    </Card>
</div>
</template>
<script>
    export default {
        data () {   
            return{showmode0: false,
            showmode1: false,
            showmode2: -2,
            showmode3: -3,
            showmode4: -4}
        },
        methods: {
            handleSubmit(option) {
                this.$store.commit('setOption',option);
                this.showmode2 = 2;
                this.showmode4 = -4;
                this.showmode3 = -3;
            },
            handleSubmit0(option) {
                this.$store.commit('setOption',option);
                // if (this.showmode4=false){
                //     this.showmode4=true;}
                // else
                //     {this.showmode4 = false;}
                this.showmode3 = 3;
                this.showmode2 = -2;
                
                this.showmode4 = -4;
            },
            handleSubmit1(option) {
                this.$store.commit('setOption',option);
                this.showmode2 = -2;
                this.showmode4 = 4;
                this.showmode3 = -3;
            },
            fillKey(key){
                this.$store.commit('setKey',key);
                this.showmode0 = true;
                this.showmode1 = false;
            },
            fillKey0(key) {
                this.$store.commit('setKey',key);
                this.showmode1 = true;
                this.showmode0 = false;
                
            },
        }
    }
</script>
<style scoped>
.btn1.active{
    margin:0 20px;
    color:blue;
 },
.btn2.active {
    color:black;
    margin:0 20px;
}
</style>